home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software of the Month Club 1999 July
/
Software of the Month - Ultimate Collection Shareware 263.iso
/
pc
/
Xtras
/
Widget Wizard
/
-INSTRCT.DIR
/
00005_Script_Primary Movie Script
< prev
next >
Wrap
Text File
|
1997-05-10
|
4KB
|
147 lines
global gPrevSprite, gNextSprite, gInstructStep, gInstructTotal, gWizWindow
global gInstructRect, gInstructionWindow
global gInstructStart --name of member which will be the first instructional text displayed. this value is determined in Widget Wizard
global gTextSprite --sprite that text is displayed in
global gPageList --list of pages(text cast members) to be displayed in gTextSprite
on startMovie
initText
initButtons
setButtons
displayNewText
end startMovie
on closeWindow
tell the stage
set gInstructRect = the rect of gInstructionWindow
-- put the rect of gInstructionWindow --DEBUG
end tell
set the text of member "PageInfo" = " "
forget window "Instructions"
end closeWindow
on initText
set gTextSprite = 1
puppetSprite gTextSprite, TRUE
end initText
on makePageList
set myOldDelimiter = the itemDelimiter
set the itemDelimiter = "-"
set mySection = item 1 of gInstructStart
set the itemDelimiter = myOldDelimiter
set myMemberName = gInstructStart
set gPageList = []
repeat while myMemberName CONTAINS mySection
add gPageList, myMemberName
set myMemberName = the name of member((the number of member myMemberName) + 1)
end repeat
set gInstructTotal = count(gPageList)
set gInstructStep = 1
-- put gPageList --DEBUG lcv64
end makePageList
on initButtons
set gPrevSprite = 2
set gNextSprite = 3
puppetSprite gPrevSprite, TRUE
puppetSprite gNextSprite, TRUE
end initButtons
on setButtons
if gInstructTotal = 1 then
set the member of sprite gPrevSprite = the number of member "PrevDim"
set the member of sprite gNextSprite = the number of member "NextDim"
else if gInstructStep = 1 then
set the member of sprite gPrevSprite = the number of member "PrevDim"
set the member of sprite gNextSprite = the number of member "NextNormal"
else if gInstructStep = gInstructTotal then
set the member of sprite gPrevSprite = the number of member "PrevNormal"
set the member of sprite gNextSprite = the number of member "NextDim"
else
set the member of sprite gPrevSprite = the number of member "PrevNormal"
set the member of sprite gNextSprite = the number of member "NextNormal"
end if
setPage
end setButtons
on displayNewText
makePageList
set the member of sprite gTextSprite = gInstructStart
setButtons
end displayNewText
on setPage
set the text of member "PageInfo" = "Page" && gInstructStep && "of" && gInstructTotal
end setPage
on goNext
set gInstructStep = gInstructStep + 1
set the member of sprite gTextSprite = getAt(gPageList, gInstructStep)
-- put getAt(gPageList, gInstructStep) --DEBUG! lcv64
setButtons
end goNext
on goPrev
set gInstructStep = gInstructStep - 1
set the member of sprite gTextSprite = getAt(gPageList, gInstructStep)
-- put getAt(gPageList, gInstructStep) --DEBUG! lcv64
setButtons
end goPrev
on doButtonHilite actionHandler
set myNormalButton = the castNum of sprite(the clickon)
set myHiliteButton = myNormalButton + 1
set the castNum of sprite (the clickon) = myHiliteButton
updateStage
repeat while the stillDown
if rollover (the clickon) then set the castNum of sprite(the clickon) = myHiliteButton
else set the castNum of sprite(the clickon) = myNormalButton
updateStage
end repeat
set the castNum of sprite (the clickon) = myNormalButton
updateStage
if rollover (the clickon) then
if not voidP(actionHandler) then do actionHandler
end if
end doButtonHilite
on updateWindow
setButtons
if objectP(window gWizWindow) then
-- put "telling window" && gWizWindow lcv64
tell window gWizWindow
stuffInstructions
end tell
else
put "telling stage"
tell the stage
stuffInstructions
end tell
end if
end updateWindow